package edu.gduf.parcel.repository.plugin;

public class Page {
	private int pageSize = 20;
	private int totalRecord;
	private int curPage = 1;

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		if (pageSize > 0)
			this.pageSize = pageSize;
	}

	public int getTotalRecord() {
		return totalRecord;
	}

	public void setTotalRecord(int totalRecord) {
		if (totalRecord > 0)
			this.totalRecord = totalRecord;
	}

	public int getCurPage() {
		return curPage;
	}

	public void setCurPage(int curPage) {
		if (curPage > 0)
			this.curPage = curPage;
	}

	public int getTotalPage() {
		return getTotalRecord() % getPageSize() == 0 ? getTotalRecord() % getPageSize()
				: getTotalRecord() % getPageSize() + 1;
	}
	
}
